package org.rayken.trix.commons.game;

import java.util.List;

import org.rayken.trix.commons.card.Card;

public class Play {

	private Player player;
	private Card card;
	private Trick trick;
	
	
	Play(Player player, Trick trick) {
		this.player = player;
		this.trick = trick;
	}


	public Player getPlayer() {
		return player;
	}
	
	public Card getCard() {
		return card;
	}
	
	public Trick getTurn(){
		return trick;
	}

	public List<Card> getAvailablePlayableCard() {
		return trick.getRun().getAvailablePlayableCard(player, trick);
	}


	public void playCard(Card cardToPlay) {
		card = cardToPlay;
		trick.getRun().cardPlayed(player, trick, cardToPlay);
	}

}
